home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / maksiu / lists / amoslist-1295.lzh / AMOSLIST / 000075_amos-request@svcs1.digex.net_Fri Dec 15 00:43:16 1995.msg < prev    next >
Internet Message Format  |  1995-12-31  |  4KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id AAA27855;  for <mcox@access.digex.net> ; Fri, 15 Dec 1995 00:43:15 -0500
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id TAA19214 for amos-out; Tue, 5 Dec 1995 19:58:38 -0500
  3. Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id TAA19211 for <amos-list@svcs1.digex.net>; Tue, 5 Dec 1995 19:58:34 -0500
  4. Received: from vortex.netbistro.com (root@vortex.netbistro.com [204.244.105.1]) by mail1.access.digex.net (8.6.12/8.6.12) with SMTP id TAA05523;  for <amos-list@access.digex.net> ; Tue, 5 Dec 1995 19:58:30 -0500
  5. Received: by vortex.netbistro.com (Smail3.1.29.1 #1)
  6.     id m0tN8BC-000LUbC; Tue, 5 Dec 95 16:57 PST
  7. Date: Tue, 5 Dec 1995 16:57:32 -0800 (PST)
  8. From: Gau <gau@vortex.netbistro.com>
  9. To: Formula One Licensew <Steve@dcandy.demon.co.uk>
  10. cc: amos-list@access.digex.net
  11. Subject: Re: Hi
  12. In-Reply-To: <9512051902.AA001an@dcandy.demon.co.uk>
  13. Message-ID: <Pine.BSD.3.91.951205162600.5080A-100000@vortex.netbistro.com>
  14. MIME-Version: 1.0
  15. Content-Type: TEXT/PLAIN; charset=US-ASCII
  16. Status: RO
  17. X-Status: 
  18.  
  19. On Tue, 5 Dec 1995, Formula One Licensew wrote:
  20.  
  21. > a) Does anyone know a way of iconifying an Amos program?
  22. >    i.e. Flip to Workbench and leave an icon on it that the user can double
  23. >         click on to return to the Amos program. A lot to ask I know,
  24. >         maybe a window type title bar with gadgets would work just as well?
  25.  
  26. Your AMOS program would have to create a message port.  Then you write a 
  27. small program in either C or assembler that will send a message 
  28. specificaly to the port created by the AMOS program.  When your AMOS 
  29. program gets wind of the message, it simply does an Amos To Front to get 
  30. the AMOS screen back.  Put the small program onto an icon and you've get 
  31. it beat.  There's some fiddling necessary to get the object to show up on 
  32. Workbench and I don't exactly know how you'd tell workbench to add the 
  33. icon.  Icon library maybe?  Someone help me out here if they can.  Your 
  34. AMOS program can use LoadSeg from the DOS library and Exec's CreateTask 
  35. to get the message task to run under control from the main program and 
  36. use KillTask and UnloadSeg to remove when your program finishes.
  37. > d) Does anyone have file format descriptions of Bmp,Jpeg,Pic and any other
  38. >    picture file format? This is for the author of BlackBoard, he can't
  39. >    use datatypes for one reason or another. I have found GIF,PCX & IFF
  40. >    descriptions anybody got any others please?
  41. >
  42. Talk about intersting timing - I just hacked the BMP format for use on a 
  43. 486 project I'm doing.  Given a 256-color bitmap (ie: 8 bits/pixel), the 
  44. format will be like this:
  45.  
  46.     struct BMP {
  47.         char    "BM",
  48.         ulong    filesize,
  49.         ulong    0,               /* ??? */
  50.         ulong    GfxOffset,         /* from start of file */
  51.         ulong    PaletteOffset,     /* from this location */
  52.         ulong    width,              /* width of image  */
  53.         ulong   height,              /* height of image */
  54.         ushort    0,        /* ??? */
  55.         ushort    bitsperpixel,    /* 8 */
  56.         ulong    0,        /* ??? */
  57.         ulong    bodysize,    /* size of image in bytes */
  58.         ulong    fill[2]        /* ??? */
  59.         ulong    palettesize    /* # colors in palette */
  60.         ulong    ditto        /* ??? */
  61.         ulong    palette[256]    /* palette information */
  62.         byte    firstpixel    /* first pixel of image */
  63.         ...
  64.     };
  65.  
  66.     Note: I don't know exactly what the palette ordering is,
  67.     it's either rr gg bb 00, or bb gg rr 00, but I can't say for
  68.     sure since I don't exactly know the VGA's ordering myself.
  69.     I know that I get the right results if I use
  70.  
  71.     ubyte *foo;
  72.     ulong pal;
  73.     foo=(ubyte *)&pal;
  74.     // assume an open file and fd is the descriptor...
  75.     read(fd,foo,4)  // read four bytes from the palette of the BMP
  76.     r=(*foo)>>2;
  77.     g=(*(foo+1))>>2;
  78.     b=(*(foo+2))>>2;
  79.     _remappalette(colorfrom0to255,(r<<16)+(g<<8)+b);
  80.  
  81.     If 0x0000000000rrrrrr00gggggg00bbbbbb is the format of the
  82.     VGA palette then I got it right the first time, if not, then
  83.     I got red and blue backwards and the BMP is then using bb gg rr 00
  84.  
  85. Cheers,
  86.  
  87. ==============================================================================
  88. Gau of the Veldt
  89.  
  90.   "Draped in monster hides, eyes shining with intelligence.
  91.    A youth surviving against all odds..."
  92.  
  93. ===== Email: gau@netbistro.com ====== WWW: http://www.netbistro.com/comp =====
  94.